from pydantic_settings import BaseSettings
from typing import Literal




class DataBaseSettings(BaseSettings):
    """
    数据库配置
    """

    db_type: Literal['mysql'] = 'mysql'
    db_host: str = '127.0.0.1'
    db_port: int = 63366
    db_username: str  = 'root'
    db_password: str =  '123456'
    db_database: str = ''
    db_echo: bool = True
    db_max_overflow: int = 10
    db_pool_size: int = 50
    db_pool_recycle: int = 3600
    db_pool_timeout: int = 30


class RedisSettings(BaseSettings):
    """
    Redis配置
    """

    redis_host: str = '127.0.0.1'
    redis_port: int = 16380
    redis_username: str = ''
    redis_password: str = '123456'
    redis_database: int = 1

